﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using EzDesk.Core.Model;

using System.Xml.Linq;

namespace EzDesk.Core.Interface
{
    [ServiceContract]
    public interface ICoreClientService
    {
        #region [ Globle Info ]
        [OperationContract]
        Organization GetOrganizationInfo();
        #endregion

        #region [ App Functions Method ]

        [OperationContract]
        List<AppFunction> GetAllAppFunctions(Guid userId);

        [OperationContract]
        List<AppFunctionType> GetAllAppFunctionTypes(Guid userId);

        [OperationContract]
        List<AppFunction> GetAppFunctionsByTypeName(Guid userId, string appFunctionTypeName);

        [OperationContract]
        List<AppFunctionType> GetAllAppFunctionCategories(Guid userId);

        [OperationContract]
        List<AppFunction> GetAppFunctionsByCategoryName(Guid userId, string categoryName);

        [OperationContract]
        string GetAppFunctionShortcutIds(Guid userId);
        [OperationContract]
        void UpdateAppFunctionShortcutSequnce(Guid userId, string shortCutIdSequnces);

        #endregion

        #region [ Feed Methods]
        
        FeedCollection GetFeeds(Guid userId, DateTime? from, DateTime? to, bool includeNotification = true);
        void UpdateFeedStatus(List<FeedStatus> feeds, string memberString);

        #endregion

        #region [ UserProfile Method ]

        [OperationContract]
        UserProfile GetUserProfileById(Guid userId);

        [OperationContract]
        SimpleUser GetSimpleUserById(Guid userId);

        [OperationContract]
        List<SimpleUser> GetSimpleUserInfos(string memberstring);

        [OperationContract]
        Dept GetDeptById(Guid deptId);

        #endregion

        #region [ Clients Management ]
        [OperationContract]
        string GetClientBaseUrl();
        #endregion


        void UpdateOrganizationInfo(Organization org);

        List<Group> GetPermissionGroups();

        List<Group> GetUserPermissionGroups(Guid userId);

        void UpdateUserGroups(List<Guid> groupIdList, Guid userId);
        bool CheckOutOfPeriod();
    }
}
